//
//  UIColor + Extension.swift
//  01.weibo
//
//  Created by 谢玉锋 on 16/7/13.
//  Copyright © 2016年 itheima.cn. All rights reserved.
//

import UIKit


//let randomColor: UIColor = UIColor()
//
// class func randomColor () {
//
//    
//}

//扩展中添加方法
extension UIColor {

    //类方法(类名可以点出来), 返回一个UIColor
    class func randomColor () ->UIColor {
    
        let r = CGFloat(arc4random_uniform(256)) / 255.0
        let g = CGFloat(arc4random_uniform(256)) / 255.0
        let b = CGFloat(arc4random_uniform(256)) / 255.0
        return UIColor (red: r, green: g, blue: b, alpha: 1)
    }
    
}

